<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ page import="java.sql.*"%>
<%@ page import="cn.estore.util.*"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<%
request.setCharacterEncoding("UTF-8");
String username=request.getParameter("username");
Connection conn=null;
Statement stmt=null;
ResultSet rs=null;
DBConnection jdbc=new DBConnection();
conn=jdbc.conn;
String realname="";
String sex="";
String pwd="";
String zhuanye="";
String aihao="";
String email="";
int id=0;
int age=0;
int flag=0;
stmt=conn.createStatement();
String sql="select * from user where username='"+username+"'";
rs=stmt.executeQuery(sql);
    if(rs.next())
    {
    	id=rs.getInt(1);
  		realname=rs.getString(3);
  		age=rs.getInt(4);
  		sex=rs.getString(5);
  		pwd=rs.getString(6);
  		zhuanye=rs.getString(7);
  		aihao=rs.getString(8);
  		email=rs.getString(9);
  		flag=1;
  		
    }
    if(flag==1){
%>
<form action="DeleteUserByUnamego1.jsp" method="post">
<table border="1" align="center">
<tr><td colspan=2><center>您要删除的信息是：</center></td></tr>
<tr><td>序号：</td>
<td><input type="text" name="id" value=<%=id %>></td></tr>
<tr><td>用户名：</td>
<td><input type="text" name="username" value=<%=username %>></td></tr>
<tr><td>真实姓名：</td>
<td><input type="text" name="realname" value=<%=realname %>></td></tr>
<tr><td>年龄：</td>
<td><input type="text" name="age" value=<%=age %>></td></tr>
<tr><td>性别：</td>
<td><input type="text" name="sex" value=<%=sex %>></td></tr>
<tr><td>密码：</td>
<td><input type="text" name="pwd" value=<%=pwd %>></td></tr>
<tr><td>专业：</td>
<td><input type="text" name="zhuanye" value=<%=zhuanye %>></td></tr>
<tr><td>爱好：</td>
<td><input type="text" name="aihao" value=<%=aihao %>></td></tr>
<tr><td>电子邮箱：</td>
<td><input type="text" name="email" value=<%=email %>></td></tr>
<tr><td colspan=2><center><input type="submit" value="确定删除"></td></tr>
</table>
</form>
<%
      }
      else
      {
    	  out.print("查无此人！");
      }
if(rs!=null) rs.close();
if(stmt!=null) stmt.close();
if(conn!=null) conn.close();
%>
</body>
</html>